<template>
  <div>
    <el-container>
      <el-aside width="200px"><MenuComponent/></el-aside>
      <el-container>
        <el-header><HeaderComponent/></el-header>
        <el-main><router-view/></el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import HeaderComponent from "./HeaderComponent.vue";
import MenuComponent from "./MenuComponent.vue";
export default {
  name: 'admin',
  components: {
    HeaderComponent,
    MenuComponent
  },
  data(){
    return{
      admin:{
        adminId:1,
        adminName:'张三',
        adminPass:'123456',
        adminTel:'123456',
        adminEmail:'123456@qq.com',
        adminImg:'http://rwuqscd8h.bkt.clouddn.com/09a21a0b-b5dc-4ea8-bdf5-29cede3777c4',
        adminSex:'男',
        adminRole:'管理员'
      },
      mounted(){
        localStorage.setItem("admin",this.admin)
      }
    }
  }
};
</script>

<style scoped>
.el-header, .el-footer {
  background-color: white;
  color: #333;
  text-align: center;
  /*line-height: 60px;*/
}

.el-aside {
  background-color: #D3DCE6;
  color: #333;
  text-align: center;
  /*line-height: 200px;*/
}

.el-main {
  /*background-color: #E9EEF3;*/
  color: #333;
  text-align: center;
  /*line-height: 160px;*/
}

body > .el-container {
  /*margin-bottom: 40px;*/
  height: 100vh;
  margin-top: 0; /* 去除顶部间距 */
  margin-bottom: 0; /* 去除底部间距 */
  overflow-y: auto; /* 或 scroll */
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  /*line-height: 260px;*/
}

.el-container:nth-child(7) .el-aside {
  /*line-height: 320px;*/
}
</style>
